import React from 'react'
import ReactDOM from 'react-dom'
import { Provider } from 'react-redux'
import { BrowserRouter as Router } from 'react-router-dom'
import createHistory from 'history/createBrowserHistory'
import store from './src/store/configStore'
import Routes from './src/routes'
//自适应JS
import './src/utils/htmlFontSize'
//antd CSS
import 'antd-mobile/dist/antd-mobile.min.css'
//小图标CSS
import 'material-design-icons/iconfont/material-icons.css'
//主CSS
import './src/resource/css/main.less'
import Api from './src/utils/api'

const history = createHistory();
global.Api = Api;

ReactDOM.render(
	<Provider store={store}>
		<Router history={history}>
			<Routes />
		</Router>
	</Provider>,
	document.getElementById('container')
)